<template>
    <div class="">{{ showText() }}</div>
</template>
<script>
export default {
    name: 'ShelfFormat',
    props: {
        value: {
            type: [String, Number],
            default: ''
        }
    },
    data() {
        return {
            list: {
                1: '上架',
                2: '下架可见',
                0: '下架不可见'
            }
        }
    },
    methods: {
        // 格式化
        showText() {
            let list = this.list;
            let str = list[this.value] || ''
            return str
        }
    }
}
</script>
<style lang="scss" scoped>

</style>